﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:wpf="clr-namespace:BlackjackBot.Wpf">

	<wpf:HandToItemConverter x:Key="HandToItemConverter"/>
	<wpf:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>

	<!-- Simple Button - This control sets brushes on each state. Note that these brushes must be listed above since they are static resources -->
	<Style x:Key="BlackJackEnterBtn" TargetType="{x:Type Button}" BasedOn="{x:Null}">
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate>

					<!-- We use Grid as a root because it is easy to add more elements to customize the button -->
					<Grid x:Name="Grid" Width="376" Height="76">

						<!-- Content Presenter is where the text content etc is placed by the control -->
						<!-- The bindings are useful so that the control can be parameterized without editing the template -->
						<Image HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,-4,-4" Source="/BlackjackBot.Wpf;component/Images/EnterButton.png" Stretch="Fill"/>
						<!-- The bindings are useful so that the control can be parameterized without editing the template -->
						<Image x:Name="image" Margin="40.574,17.74,39.426,14.26" Source="/BlackjackBot.Wpf;component/Images/EnterButtonHover.png" Stretch="Fill" Visibility="Hidden"/>
						<ContentPresenter Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" OpacityMask="{DynamicResource PrimaryTextBrush}" />
					</Grid>

					<!--Each state sets a brush on the Border in the template -->
					<ControlTemplate.Triggers>
						<Trigger Property="Border.BorderBrush" Value="{x:Null}"/>
						<Trigger Property="Border.BorderBrush" Value="{x:Null}"/>
						<Trigger Property="IsKeyboardFocused" Value="true"/>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Visibility" TargetName="image" Value="Visible"/>
						</Trigger>
						<Trigger Property="ButtonBase.IsPressed" Value="true"/>
						<Trigger Property="IsEnabled" Value="true"/>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="Height" Value="80"/>
	</Style>
	<Style x:Key="RunButton" TargetType="{x:Type Button}" BasedOn="{x:Null}">
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">

					<!-- We use Grid as a root because it is easy to add more elements to customize the button -->
					<Grid x:Name="Grid" Margin="0,0,0,0" RenderTransformOrigin="0.802,0.467" Width="89">

						<!-- Content Presenter is where the text content etc is placed by the control -->
						<!-- The bindings are useful so that the control can be parameterized without editing the template -->
						<Image Margin="1.812,0,0,0" Source="/BlackjackBot.Wpf;component/Images/btn-Run.png"  Stretch="None
						"/>
						<Image x:Name="image" Margin="2,0,-2,0" Source="/BlackjackBot.Wpf;component/Images/btn-RunHover.png" Stretch="None" Visibility="Hidden"/>
					</Grid>

					<!--Each state sets a brush on the Border in the template -->
					<ControlTemplate.Triggers>
						<Trigger Property="IsKeyboardFocused" Value="true"/>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Visibility" TargetName="image" Value="Visible"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true"/>
						<Trigger Property="IsEnabled" Value="true"/>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="btnGoBack" TargetType="{x:Type Button}" BasedOn="{x:Null}">
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">

					<!-- We use Grid as a root because it is easy to add more elements to customize the button -->
					<Grid x:Name="Grid" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0">
						<Image Margin="0" Source="/BlackjackBot.Wpf;component/Images/btn-GoBack.png"/>
						<Image x:Name="image" Margin="0" Source="/BlackjackBot.Wpf;component/Images/btn-GoBackHover.png" Visibility="Hidden"/>

						<!-- Content Presenter is where the text content etc is placed by the control -->
						<!-- The bindings are useful so that the control can be parameterized without editing the template -->
					</Grid>

					<!--Each state sets a brush on the Border in the template -->
					<ControlTemplate.Triggers>
						<Trigger Property="IsKeyboardFocused" Value="true"/>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Visibility" TargetName="image" Value="Visible"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true"/>
						<Trigger Property="IsEnabled" Value="true"/>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="btnGoFwd" TargetType="{x:Type Button}" BasedOn="{x:Null}">
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">

					<!-- We use Grid as a root because it is easy to add more elements to customize the button -->
					<Grid x:Name="Grid" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0">
						<Image Margin="0" Source="/BlackjackBot.Wpf;component/Images/btn-GoFwd.png"/>
						<Image x:Name="image" Margin="0" Source="/BlackjackBot.Wpf;component/Images/btn-GoFwdHover.png" Visibility="Hidden"/>

						<!-- Content Presenter is where the text content etc is placed by the control -->
						<!-- The bindings are useful so that the control can be parameterized without editing the template -->
					</Grid>

					<!--Each state sets a brush on the Border in the template -->
					<ControlTemplate.Triggers>
						<Trigger Property="IsKeyboardFocused" Value="true"/>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Visibility" TargetName="image" Value="Visible"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true"/>
						<Trigger Property="IsEnabled" Value="true"/>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Color x:Key="PrimaryTextColor">#ffdcad91</Color>
	<SolidColorBrush x:Key="PrimaryTextBrush" Color="{StaticResource PrimaryTextColor}" />

	<ImageBrush x:Key="BlackJackBackground" ImageSource="/Images/background.jpg" Stretch="Fill"/>
	<!-- used as the primary text color in the Ledger and card table -->

	<Color x:Key="HeaderTextColor">#ff8e5029</Color>
	<SolidColorBrush x:Key="HeaderTextBrush" Color="{StaticResource HeaderTextColor}" />

	<Color x:Key="CardsTableBgColor">#771c0601</Color>
	<SolidColorBrush x:Key="CardsTableBgBrush" Color="{StaticResource CardsTableBgColor}" />


	<SolidColorBrush x:Key="HomeTextBrush" Color="#ff2a0c01" />

	<Style x:Key="BG">
		<Setter Property="Grid.Background" Value="{DynamicResource BlackJackBackground}" />
	</Style>

	<ImageBrush x:Key="BlackJackBackgroundPattern" ImageSource="/Images/Tile.png" />
	<Style x:Key="BG_Pattern">
		<Setter Property="Grid.Background" Value="{DynamicResource BlackJackBackgroundPattern}"/>
	</Style>

	<Style x:Key="PrimaryText" TargetType="{x:Type Label}">
		<Setter Property="Foreground" Value="{StaticResource PrimaryTextBrush}" />
	</Style>

	<Style x:Key="PrimaryText2" TargetType="{x:Type TextBlock}">
		<Setter Property="Foreground" Value="{StaticResource PrimaryTextBrush}" />
		<Setter Property="FontFamily" Value="Century" />
		<Setter Property="FontSize" Value="16" />
	</Style>
	<Style x:Key="PrimaryTextLists" TargetType="{x:Type TextBlock}">
		<Setter Property="Foreground" Value="{StaticResource PrimaryTextBrush}" />
		<Setter Property="FontFamily" Value="Century" />
		<Setter Property="FontSize" Value="14" />
	</Style>
	<Style x:Key="CardsTableBg">
		<Setter Property="Grid.Background" Value="{DynamicResource BlackJackBackground}" />
	</Style>

	<Style x:Key="HeaderText" TargetType="{x:Type TextBlock}">
		<Setter Property="Foreground" Value="{StaticResource HeaderTextBrush}" />
		<Setter Property="FontFamily" Value="Century" />
		<Setter Property="FontSize" Value="16" />
		<Setter Property="Margin" Value="6,6,0,0" />
	</Style>

	<Style x:Key="HomeText" TargetType="{x:Type TextBlock}">
		<Setter Property="Foreground" Value="{StaticResource HomeTextBrush}" />
		<Setter Property="FontFamily" Value="Century" />
		<Setter Property="FontSize" Value="24" />
		<Setter Property="Margin" Value="6,6,0,0" />
	</Style>

	<Style x:Key="PlayerResultText" TargetType="{x:Type TextBlock}">
		<Setter Property="Foreground" Value="{StaticResource HomeTextBrush}" />
		<Setter Property="FontFamily" Value="Century" />
		<Setter Property="FontSize" Value="30" />
		<Setter Property="Margin" Value="0,0,0,0" />
		<Setter Property="FontWeight" Value="Bold" />
	</Style>

	<Style x:Key="HeaderTextBg" TargetType="{x:Type Grid}">
		<Setter Property="Background" Value="#ff330f01" />
	</Style>

	<Style x:Key="TableLists" TargetType="{x:Type Grid}">
		<Setter Property="Background" Value="#00000000" />
	</Style>

	<Style x:Key="TransparentItems" TargetType="{x:Type ItemsControl}">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
	</Style>

	<Style x:Key="TransparentList" TargetType="{x:Type ListBox}">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
	</Style>

</ResourceDictionary>